package com.example.medicalretrieval.pojo;


import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;


@Entity
public class User {
    @PrimaryKey(autoGenerate = true)
    private long id;
    private String account="";
    private String password="";
    private String email="";
    private int sex = 0;
    private String telephone="";
    private int permissionGroupId=0;
    private String avatar="http://localhost:8080/back/mavAvatar";
    private int disabled=0;

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", account='" + account + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", sex=" + sex +
                ", telephone='" + telephone + '\'' +
                ", permissionGroupId=" + permissionGroupId +
                ", avatar='" + avatar + '\'' +
                ", disabled=" + disabled +
                '}';
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public int getPermissionGroupId() {
        return permissionGroupId;
    }

    public void setPermissionGroupId(int permissionGroupId) {
        this.permissionGroupId = permissionGroupId;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public int getDisabled() {
        return disabled;
    }

    public void setDisabled(int disabled) {
        this.disabled = disabled;
    }

    public User() {
    }

    @Ignore
    public User(long id, String account, String password, String email, int sex, String telephone, int permissionGroupId, String avatar, int disabled) {
        this.id = id;
        this.account = account;
        this.password = password;
        this.email = email;
        this.sex = sex;
        this.telephone = telephone;
        this.permissionGroupId = permissionGroupId;
        this.avatar = avatar;
        this.disabled = disabled;
    }
}
